import Cookies from 'js-cookie'

/**
 * 判断值是否登录
 * @returns {boolean}
 */
export const getIsLogin = () => {
    return !!Cookies.get('d_logintoken')
}

/**
 * 判断值是否移动端
 * @returns {boolean}
 */
export const isMobile = (function () {
    return navigator.userAgent.includes('Mobile')
})()

/**
 * 判断值是否为空
 * @param v
 * @returns {boolean}
 */
export const isUndef = v => v === undefined